home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / hewitt.swf / scripts / DefineButton2_803 / BUTTONCONDACTION on(keyPress z).as < prev   
Encoding:
Text File  |  2011-06-09  |  1.0 KB  |  42 lines

  1. on(keyPress "z"){
  2.    if(_root.togglet == 0 && _root.even7 == 20 && _root._currentframe > 1 && _root._currentframe < 40 && _root.inven._currentframe == 1 && _root.txt_number <= 1)
  3.    {
  4.       _root.TUTS.nextFrame();
  5.       _root.even41 = 1;
  6.       new_frame = _root.micon._currentframe;
  7.       if(new_frame > 4)
  8.       {
  9.          _root.take = new_frame;
  10.       }
  11.       foundframe = 0;
  12.       while(foundframe == 0)
  13.       {
  14.          new_frame--;
  15.          if(new_frame < 1)
  16.          {
  17.             new_frame = 62;
  18.          }
  19.          else if(new_frame < 5)
  20.          {
  21.             foundframe = new_frame;
  22.          }
  23.          i = 1;
  24.          while(i < 100)
  25.          {
  26.             if(_root.inven["box" + i]._currentframe == new_frame)
  27.             {
  28.                _root.inven["box" + i].gotoAndStop(1);
  29.                foundframe = new_frame;
  30.             }
  31.             i++;
  32.          }
  33.          if(foundframe == 3)
  34.          {
  35.             foundframe = 2;
  36.          }
  37.       }
  38.       _root.micon.gotoAndStop(foundframe);
  39.    }
  40.    _root.togglet = 2;
  41. }
  42.